import { DataNode } from 'antd/es/tree';
const treeData: DataNode[] = [
  {
    title: '部件',
    key: '0',
    children: [],
  },
  {
    title: '刀轨',
    key: '1',
    children: [],
  },
];
export const setTreeData = (modelIds: string[], traceIds?: string[]) => {
  modelIds.forEach((item) => {
    treeData[0].children?.push({
      title: item,
      key: item,
    });
  });
  traceIds.forEach((item) => {
    treeData[1].children?.push({
      title: '刀路' + item,
      key: '1-' + item,
    });
  });
};
export const getTreeData = () => {
  return treeData;
};
